<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    function loadImage(src) {
      return new Promise((resolve, reject) => {
        const image = new Image();
        image.src = src;
        image.onload = () => {
          resolve(image)
        }
        image.onerror = reject
        document.body.appendChild(image)
      })
    }
    loadImage('https://tpc.googlesyndication.com/daca_images/simgad/13293334071275082131').then(image => {
      console.log(image)
      image.style.border = "solid 2px red"
    })
  </script>
</body>
</html>